{% if post.pin %}
<article class="article-item keep-top">
{% else %}
<article class="article-item keep-top">
{% endif %}
    {% if post.cover %}
        <div class="post-cover">
            <a class="post-link" href="{{ post.url | relative_url }}" title="{{ post.title }}"></a>
            <img class="lazyload" src="/assets/img/loading.gif" data-src="{{ post.cover | relative_url }}" href="{{ post.url | relative_url }}" alt="">
        </div>
    {% endif %}
    <section class="post-preview">
        <a class="post-link" href="{{ post.url | relative_url }}" title="{{ post.title }}"></a>
        <h2 class="post-title">{% if post.pin %}<span class="keep-top">[置顶]</span> {% endif %}{{ post.title }}</h2>
        {% if post.subtitle %}
        <h3 class="post-subtitle">{{ post.subtitle }}</h3>
        {% endif %}
        {% if post.subtitle.size==0 or post.subtitle==nil %}
        <p class="post-excerpt">{{ post.excerpt | strip_html | strip_newlines | truncate: 126}}</p>
        {% endif %}
    </section>
    <footer class="post-meta">
        <div class="post-tags">
            {% if post.tags.size > 0 %}
                {% for tag in post.tags  %}
                <a href={{ "/tags.html#" | append: tag | relative_url }} class="post-tag">{{ tag }}</a>
                {% endfor %}
            {% endif %}
        </div>
        <time class="post-date" datetime="{{ post.date | date:"%y-%m-%d" }}">
            <svg class="icon" aria-hidden="true">
                <use xlink:href="#icon-time2"></use>
            </svg>
            {% case site.formats.time %}
            {% when 0 %}
                {{ post.date | date: "%Y-%m-%d" }} 
            {% when 1 %}
                {{ post.date | date_to_string }}
            {% else %}
                {{ post.date | date: "%Y年%-m月%-d日"  }}
            {% endcase %}
        </time>
    </footer>
</article>